package com.cl.pattern.observer.demo2;

public class Customer implements ICustomer{
 
    private String name;
    private String message;
 
    public Customer(String name){
        this.name = name;
    }
 

    public void receiveMessage(String message) {
        this.message = message;
        read();
    }
 
    public void read(){
        System.out.println(name+":收到推送消息："+message);
    }
}